function deleteException(id){
	
	$.ajax({
		url : ctx + '/exception/deleteHealthException',
		data : {id:id},
		dataType : 'json',
		type : 'post',
		success : function(data){
			if(data.status != "success"){
				alert(data.msg);
			}else{
				location.href = ctx + '/exception/exception';
			}
		},
		error : function(){
			alert("系统错误");
		}
	});
}


function deleteBatch(){
	
	var checks =[]; 
	
	$('input[name="myHoverTreechk"]:checked').each(function(){ 
		checks.push($(this).val()); 
	}); 
	
	if(checks.length == 0)
		return;
	
	$.ajax({
		url : ctx + '/exception/deleteHealthExceptionBatch',
		data : {checks:checks},
		dataType : 'json',
		type : 'post',
		success : function(data){
			if(data.status != "success"){
				alert(data.msg);
			}else{
				location.href = ctx + '/exception/exception';
			}
		},
		error : function(){
			alert("系统错误");
		}
	});
	
}


window.onload = function() {
    document.getElementById("params").focus();
    
    var checkboxs = document.getElementsByName("myHove" + "rTreechk");
	var hvtck = document.getElementById("hvtck");
	cklen = checkboxs.length;
	hvtck.onclick = function() {
		if (this.checked == true) {
			for (var i = 0; i < cklen; i++) {
				checkboxs[i].checked = true;
			}
			document.getElementById("dohovert" + "ree").innerHTML = ""
		} else {
			for (var i = 0; i < cklen; i++) {
				checkboxs[i].checked = false;
			}
			document.getElementById("dohovertree").innerHTML = ""
		}
	}
}




